Skip to content

[5/N] Add get_option/set_option APIs #11758

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: gh/cccclai/29/base
Choose a base branch
from

Conversation

cccclai
Copy link
Contributor

@cccclai cccclai commented Jun 17, 2025

Stack from ghstack (oldest at bottom):

Expose the API to set/get backend option. We can either pass in {backend_name, backend options} or {backend options map}

Differential Revision: D76825663

Differential Revision: D76825663

Copy link

pytorch-bot bot commented Jun 17, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/11758

Note: Links to docs will display an error until the docs builds have been completed.

❌ 2 New Failures, 2 Unrelated Failures

As of commit cfb760b with merge base 608a745 (image):

NEW FAILURES - The following jobs have failed:

FLAKY - The following jobs failed but were likely due to flakiness present on trunk:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jun 17, 2025
cccclai added a commit that referenced this pull request Jun 17, 2025
Differential Revision: [D76825663](https://our.internmc.facebook.com/intern/diff/D76825663/)

ghstack-source-id: 290994800
Pull Request resolved: #11758
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D76825663

Copy link

This PR needs a release notes: label

If your change should be included in the release notes (i.e. would users of this library care about this change?), please use a label starting with release notes:. This helps us keep track and include your important work in the next release notes.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "release notes: none"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

Expose the API to set/get backend option. We can either pass in {backend_name, backend options} or {backend options map}

Differential Revision: [D76825663](https://our.internmc.facebook.com/intern/diff/D76825663/)

Differential Revision: [D76825663](https://our.internmc.facebook.com/intern/diff/D76825663)

[ghstack-poisoned]
cccclai added a commit that referenced this pull request Jun 17, 2025
Pull Request resolved: #11758


ghstack-source-id: 290994800

Expose the API to set/get backend option. We can either pass in {backend_name, backend options} or {backend options map}

Differential Revision: [D76825663](https://our.internmc.facebook.com/intern/diff/D76825663/)
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D76825663

Expose the API to set/get backend option. We can either pass in {backend_name, backend options} or {backend options map}

Differential Revision: [D76825663](https://our.internmc.facebook.com/intern/diff/D76825663/)

Differential Revision: [D76825663](https://our.internmc.facebook.com/intern/diff/D76825663)

[ghstack-poisoned]
@cccclai cccclai changed the title Add get_option/set_option APIs [5/N] Add get_option/set_option APIs Jun 18, 2025
cccclai added a commit that referenced this pull request Jun 18, 2025
Pull Request resolved: #11758


ghstack-source-id: 290994800

Expose the API to set/get backend option. We can either pass in {backend_name, backend options} or {backend options map}

Differential Revision: [D76825663](https://our.internmc.facebook.com/intern/diff/D76825663/)
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D76825663

Expose the API to set/get backend option. We can either pass in {backend_name, backend options} or {backend options map}

Differential Revision: [D76825663](https://our.internmc.facebook.com/intern/diff/D76825663/)

Differential Revision: [D76825663](https://our.internmc.facebook.com/intern/diff/D76825663)

[ghstack-poisoned]
cccclai added a commit that referenced this pull request Jun 18, 2025
Pull Request resolved: #11758


ghstack-source-id: 290994800

Expose the API to set/get backend option. We can either pass in {backend_name, backend options} or {backend options map}

Differential Revision: [D76825663](https://our.internmc.facebook.com/intern/diff/D76825663/)
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D76825663

Expose the API to set/get backend option. We can either pass in {backend_name, backend options} or {backend options map}

Differential Revision: [D76825663](https://our.internmc.facebook.com/intern/diff/D76825663/)

Differential Revision: [D76825663](https://our.internmc.facebook.com/intern/diff/D76825663)

[ghstack-poisoned]
cccclai added a commit that referenced this pull request Jun 23, 2025
Pull Request resolved: #11758


ghstack-source-id: 290994800

Expose the API to set/get backend option. We can either pass in {backend_name, backend options} or {backend options map}

Differential Revision: [D76825663](https://our.internmc.facebook.com/intern/diff/D76825663/)
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D76825663

Expose the API to set/get backend option. We can either pass in {backend_name, backend options} or {backend options map}

Differential Revision: [D76825663](https://our.internmc.facebook.com/intern/diff/D76825663/)

Differential Revision: [D76825663](https://our.internmc.facebook.com/intern/diff/D76825663)

[ghstack-poisoned]
cccclai added a commit that referenced this pull request Jun 23, 2025
Pull Request resolved: #11758


ghstack-source-id: 290994800

Expose the API to set/get backend option. We can either pass in {backend_name, backend options} or {backend options map}

Differential Revision: [D76825663](https://our.internmc.facebook.com/intern/diff/D76825663/)
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D76825663

* @return Error::Ok on success, Error::NotFound if backend is not found, or
* other error codes on failure
*/
Error get_option(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Error get_option(
Error get_options(

* @return Error::Ok on success, or the first error encountered when processing
* the entries
*/
Error get_option(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont think we need this. If users want something like that, they can implement it or we wait to see if users want options like that and introduce it later.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean get_option function or the get_option with backend option map?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with backend options map, is what i meant

Copy link
Contributor

@kimishpatel kimishpatel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks good. My suggestion though is that not have backendOptionsMap and related functionality right now. Users can either make convenient functions for themselves or just use set_option(name, options) for the backends they care for. And maybe just wait and see if this is something users want as part of et

Expose the API to set/get backend option. We can either pass in {backend_name, backend options} or {backend options map}

Differential Revision: [D76825663](https://our.internmc.facebook.com/intern/diff/D76825663/)

Differential Revision: [D76825663](https://our.internmc.facebook.com/intern/diff/D76825663)

[ghstack-poisoned]
cccclai added a commit that referenced this pull request Jun 23, 2025
Pull Request resolved: #11758


ghstack-source-id: 290994800

Expose the API to set/get backend option. We can either pass in {backend_name, backend options} or {backend options map}

Differential Revision: [D76825663](https://our.internmc.facebook.com/intern/diff/D76825663/)
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D76825663

cccclai added a commit that referenced this pull request Jun 23, 2025
…s} only

This PR only expose the set_option/get_option API via the pair {backend_name, backend_options}, without necessarily backend options map. The backend options map and it's corresponding API will be exposed to another PR

Reference PR in #11758 which exposes the set_option/get_option with backendoptions map too

Differential Revision: [D77190316](https://our.internmc.facebook.com/intern/diff/D77190316/)

[ghstack-poisoned]
cccclai added a commit that referenced this pull request Jun 23, 2025
…s} only

This PR only expose the set_option/get_option API via the pair {backend_name, backend_options}, without necessarily backend options map. The backend options map and it's corresponding API will be exposed to another PR

Reference PR in #11758 which exposes the set_option/get_option with backendoptions map too

Differential Revision: [D77190316](https://our.internmc.facebook.com/intern/diff/D77190316/)

ghstack-source-id: 292211297
Pull Request resolved: #11865
cccclai added a commit that referenced this pull request Jun 24, 2025
…ackend_name, backend options} only"

This PR only expose the set_option/get_option API via the pair {backend_name, backend_options}, without necessarily backend options map. The backend options map and it's corresponding API will be exposed to another PR

Reference PR in #11758 which exposes the set_option/get_option with backendoptions map too

Differential Revision: [D77190316](https://our.internmc.facebook.com/intern/diff/D77190316/)

[ghstack-poisoned]
cccclai added a commit that referenced this pull request Jun 24, 2025
…kend options} only"

This PR only expose the set_option/get_option API via the pair {backend_name, backend_options}, without necessarily backend options map. The backend options map and it's corresponding API will be exposed to another PR

Reference PR in #11758 which exposes the set_option/get_option with backendoptions map too

Differential Revision: [D77190316](https://our.internmc.facebook.com/intern/diff/D77190316/)

[ghstack-poisoned]
cccclai added a commit that referenced this pull request Jun 24, 2025
…s} only

Pull Request resolved: #11865

This PR only expose the set_option/get_option API via the pair {backend_name, backend_options}, without necessarily backend options map. The backend options map and it's corresponding API will be exposed to another PR

Reference PR in #11758 which exposes the set_option/get_option with backendoptions map too
ghstack-source-id: 292211297

Differential Revision: [D77190316](https://our.internmc.facebook.com/intern/diff/D77190316/)
cccclai added a commit that referenced this pull request Jun 24, 2025
…ackend_name, backend options} only"

This PR only expose the set_option/get_option API via the pair {backend_name, backend_options}, without necessarily backend options map. The backend options map and it's corresponding API will be exposed to another PR

Reference PR in #11758 which exposes the set_option/get_option with backendoptions map too

Differential Revision: [D77190316](https://our.internmc.facebook.com/intern/diff/D77190316/)

[ghstack-poisoned]
cccclai added a commit that referenced this pull request Jun 24, 2025
…kend options} only"

This PR only expose the set_option/get_option API via the pair {backend_name, backend_options}, without necessarily backend options map. The backend options map and it's corresponding API will be exposed to another PR

Reference PR in #11758 which exposes the set_option/get_option with backendoptions map too

Differential Revision: [D77190316](https://our.internmc.facebook.com/intern/diff/D77190316/)

[ghstack-poisoned]
cccclai added a commit that referenced this pull request Jun 24, 2025
…s} only

Pull Request resolved: #11865

This PR only expose the set_option/get_option API via the pair {backend_name, backend_options}, without necessarily backend options map. The backend options map and it's corresponding API will be exposed to another PR

Reference PR in #11758 which exposes the set_option/get_option with backendoptions map too
ghstack-source-id: 292211297

Differential Revision: [D77190316](https://our.internmc.facebook.com/intern/diff/D77190316/)
cccclai added a commit that referenced this pull request Jun 24, 2025
…ackend_name, backend options} only"

This PR only expose the set_option/get_option API via the pair {backend_name, backend_options}, without necessarily backend options map. The backend options map and it's corresponding API will be exposed to another PR

Reference PR in #11758 which exposes the set_option/get_option with backendoptions map too

Differential Revision: [D77190316](https://our.internmc.facebook.com/intern/diff/D77190316/)

[ghstack-poisoned]
cccclai added a commit that referenced this pull request Jun 24, 2025
…kend options} only"

This PR only expose the set_option/get_option API via the pair {backend_name, backend_options}, without necessarily backend options map. The backend options map and it's corresponding API will be exposed to another PR

Reference PR in #11758 which exposes the set_option/get_option with backendoptions map too

Differential Revision: [D77190316](https://our.internmc.facebook.com/intern/diff/D77190316/)

[ghstack-poisoned]
cccclai added a commit that referenced this pull request Jun 24, 2025
…s} only

Pull Request resolved: #11865

This PR only expose the set_option/get_option API via the pair {backend_name, backend_options}, without necessarily backend options map. The backend options map and it's corresponding API will be exposed to another PR

Reference PR in #11758 which exposes the set_option/get_option with backendoptions map too
ghstack-source-id: 292211297

Differential Revision: [D77190316](https://our.internmc.facebook.com/intern/diff/D77190316/)
cccclai added a commit that referenced this pull request Jun 24, 2025
…ackend_name, backend options} only"

This PR only expose the set_option/get_option API via the pair {backend_name, backend_options}, without necessarily backend options map. The backend options map and it's corresponding API will be exposed to another PR

Reference PR in #11758 which exposes the set_option/get_option with backendoptions map too

Differential Revision: [D77190316](https://our.internmc.facebook.com/intern/diff/D77190316/)

[ghstack-poisoned]
cccclai added a commit that referenced this pull request Jun 24, 2025
…kend options} only"

This PR only expose the set_option/get_option API via the pair {backend_name, backend_options}, without necessarily backend options map. The backend options map and it's corresponding API will be exposed to another PR

Reference PR in #11758 which exposes the set_option/get_option with backendoptions map too

Differential Revision: [D77190316](https://our.internmc.facebook.com/intern/diff/D77190316/)

[ghstack-poisoned]
cccclai added a commit that referenced this pull request Jun 24, 2025
…s} only

Pull Request resolved: #11865

This PR only expose the set_option/get_option API via the pair {backend_name, backend_options}, without necessarily backend options map. The backend options map and it's corresponding API will be exposed to another PR

Reference PR in #11758 which exposes the set_option/get_option with backendoptions map too
ghstack-source-id: 292250319

Differential Revision: [D77190316](https://our.internmc.facebook.com/intern/diff/D77190316/)
cccclai added a commit that referenced this pull request Jun 24, 2025
…ackend_name, backend options} only"

This PR only expose the set_option/get_option API via the pair {backend_name, backend_options}, without necessarily backend options map. The backend options map and it's corresponding API will be exposed to another PR

Reference PR in #11758 which exposes the set_option/get_option with backendoptions map too

Differential Revision: [D77190316](https://our.internmc.facebook.com/intern/diff/D77190316/)

[ghstack-poisoned]
cccclai added a commit that referenced this pull request Jun 24, 2025
…kend options} only"

This PR only expose the set_option/get_option API via the pair {backend_name, backend_options}, without necessarily backend options map. The backend options map and it's corresponding API will be exposed to another PR

Reference PR in #11758 which exposes the set_option/get_option with backendoptions map too

Differential Revision: [D77190316](https://our.internmc.facebook.com/intern/diff/D77190316/)

[ghstack-poisoned]
cccclai added a commit that referenced this pull request Jun 24, 2025
…s} only

Pull Request resolved: #11865

This PR only expose the set_option/get_option API via the pair {backend_name, backend_options}, without necessarily backend options map. The backend options map and it's corresponding API will be exposed to another PR

Reference PR in #11758 which exposes the set_option/get_option with backendoptions map too
ghstack-source-id: 292255640

Differential Revision: [D77190316](https://our.internmc.facebook.com/intern/diff/D77190316/)
cccclai added a commit that referenced this pull request Jun 24, 2025
…ackend_name, backend options} only"

This PR only expose the set_option/get_option API via the pair {backend_name, backend_options}, without necessarily backend options map. The backend options map and it's corresponding API will be exposed to another PR

Reference PR in #11758 which exposes the set_option/get_option with backendoptions map too

Differential Revision: [D77190316](https://our.internmc.facebook.com/intern/diff/D77190316/)

[ghstack-poisoned]
cccclai added a commit that referenced this pull request Jun 24, 2025
…kend options} only"

This PR only expose the set_option/get_option API via the pair {backend_name, backend_options}, without necessarily backend options map. The backend options map and it's corresponding API will be exposed to another PR

Reference PR in #11758 which exposes the set_option/get_option with backendoptions map too

Differential Revision: [D77190316](https://our.internmc.facebook.com/intern/diff/D77190316/)

[ghstack-poisoned]
cccclai added a commit that referenced this pull request Jun 24, 2025
…s} only

Pull Request resolved: #11865

This PR only expose the set_option/get_option API via the pair {backend_name, backend_options}, without necessarily backend options map. The backend options map and it's corresponding API will be exposed to another PR

Reference PR in #11758 which exposes the set_option/get_option with backendoptions map too
ghstack-source-id: 292257887

Differential Revision: [D77190316](https://our.internmc.facebook.com/intern/diff/D77190316/)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants